package com.tanhua.backmanage.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.tanhua.common.mapper.UserMapper;
import com.tanhua.common.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceQQ {

    @Autowired
    private UserMapper userMapper;

    public List<User> queryUserList(List<Long> ids) {
        QueryWrapper<User> query = new QueryWrapper<>();
        query.in("id",ids);
        return userMapper.selectList(query);
    }

    public User queryUserById(Long userId) {
        QueryWrapper<User> query = new QueryWrapper<>();
        query.eq("id", userId);
        return userMapper.selectOne(query);
    }
}
